import { axios } from '@/util';
import { Menu, Response } from '@/types';
const urls = {
  menus: `menu`,
};

export const getMenus = async (id?: number): Promise<Response | undefined> => {
  return await axios.get(urls.menus, { params: { id: id } });
};

export const updateMenu = async (menu: Menu): Promise<Response | undefined> => {
  return await axios.put(urls.menus, menu);
};
